package com.mahjong.server.component.logic.handler;

import org.apache.log4j.Logger;

import com.mahjong.server.common.Common;
import com.mahjong.server.mina.protocol.DataBuf;
import com.mahjong.server.mina.protocol.MessageProtocol;

/**
 * 
 * @author yougang
 * @date 2013-3-5 上午10:59:26
 * @Description 麻将响应
 */
public class HandleResp extends MessageProtocol {

  private static final byte TAG=Common.Resp;

  private static final short PROTOCOL_NUM=0x0106;
  
  private Logger log = Logger.getLogger(this.getClass());

  private String result;

  public HandleResp() {
    setTag(TAG);
    setProtocolNum(PROTOCOL_NUM);
  }

  public HandleResp(String result) {
    this();
    this.result=result;
  }

  @Override
  public void respEncode(DataBuf buf) {
      buf.putString(result);
	  log.info("处理结果"+result);
  }
}
